package main

import (
	// "fmt"
	"time"
)

import (
	// . "GsDict"
	. "GsEngine"
	. "GsGate"
	. "tksConfig"
	. "tksLog"
	. "tksStatic"
	. "tksTcp"
)

func Register() {
	RegisterServerCmd(CmdLoginGsReq, RecvLogin)
	RegisterServerCmd(CmdNewRoleReq, RecvNewRole)
}

func main() {
	InitLogger("gs")
	//
	LoadConfig("config.json")
	port, _ := Config.Get("server").Get("port").Int()
	Debug("port: %d", port)
	// LoadDict()
	//
	if !ConnectAllGate() {
		return
	}
	for {
		time.Sleep(10 * time.Second)
	}
}
